#pragma once


#include "glad/glad.h"
#include <GLFW/glfw3.h>

#include "Hazel/src/Hazel/Window.h"
#include "Hazel/src/Hazel/Render/GraphicsContext.h"

// struct GLFWwindow;

namespace Hazel{

    class WindowsWindow: public Window
    {
    public:
        WindowsWindow(const WindowProps& props);
        virtual ~WindowsWindow();

        void OnUpdate() override;

        inline unsigned int GetWidth() const override {return m_Data.Width;}
        inline unsigned int GetHeight() const override {return m_Data.Height;}

        // window attributes
        inline void SetEventCallback(const EventCallbackFn& callback)override {m_Data.EventCallBack=callback;}
        void SetVSync(bool enabled) override;
        bool IsVSync() const override;

        inline virtual void* GetNativeWindow() const override{ return (void*)m_Window; }
    private:
        virtual void Init(const WindowProps& props);
        virtual void Shutdown();
    private:
        GLFWwindow* m_Window;
        GraphicsContext* m_Context;

        struct WindowData
        {
            std::string Title;
            unsigned int Width,Height;
            EventCallbackFn EventCallBack;
            bool VSync;
        };
        WindowData m_Data;
    };
}